<?php
class type_model extends jqxGrid_CI_Model {

    function __construct()
    {
        parent::__construct();
        
    }
    
    function get($_id){
        $where=array('_id'=>$_id,'_delete'=>NULL,"_status"=>"true");
        $query=$this->db->get_where("_type", $where); 
        return $query->result();
    }
    function gets(){
        $where=array('_delete'=>NULL,"_status"=>"true");
        $query=$this->db
                ->where($where)
                ->get("_type"); 
        return $query->result();
    }
    
    function getByType($type=""){
        $where=array('_delete'=>NULL,"_status"=>"true","_type"=>$type);
        $query=$this->db
                ->where($where)
                ->order_by("_value","ASC")
                ->get("_type"); 
        return $query->result();
    }
    
}
?>
